#include <iostream>

using namespace std;

class Temp {
public:
    Temp() {}

    Temp(const string &name, const string &address, int num) : name(name), address(address), num(num) {}

    bool operator==(const Temp &rhs) const {
        return name == rhs.name &&
               address == rhs.address &&
               num == rhs.num;
    }

    bool operator<(const Temp &rhs) const {
        if (name < rhs.name)
            return true;
        if (rhs.name < name)
            return false;
        if (address < rhs.address)
            return true;
        if (rhs.address < address)
            return false;
        return num < rhs.num;
    }

    bool operator>(const Temp &rhs) const {
        return rhs < *this;
    }

    bool operator<=(const Temp &rhs) const {
        return !(rhs < *this);
    }

    bool operator>=(const Temp &rhs) const {
        return !(*this < rhs);
    }

    bool operator!=(const Temp &rhs) const {
        return !(rhs == *this);
    }

    friend ostream &operator<<(ostream &os, const Temp &temp) {
        os << "name: " << temp.name << " address: " << temp.address << " num: " << temp.num;
        return os;
    }

private:
    string name;
    string address;
    int num;
};

int main() {
    Temp().operator==(Temp());

    return 0;
}
